package org.qqcui.designpattern.patterns.proxy.statik;

/**
 * 静态代理类
 *
 * @author cuiqingqiang
 * @version 1.0
 * @date 2022/5/1 10:06
 **/
public class TeacherDaoProxy implements ITeacherDao {

    private ITeacherDao teacherDao;

    public TeacherDaoProxy(ITeacherDao teacherDao) {
        this.teacherDao = teacherDao;
    }

    @Override
    public void teach() {
        System.out.println("代理开始……");
        teacherDao.teach();
        System.out.println("提交……");
    }
}
